/**
 * Copyright (C), 2016-2019, 赋拓物联网技术有限公司
 * FileName: UserMapper
 * Author:   Administrator
 * Date:     2019/6/12 13:21
 * Description: 用户Mapper
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 **/
package com.scs.application.modules.upms.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.scs.application.modules.upms.entity.Office;
import com.scs.application.modules.upms.entity.User;
import com.scs.application.modules.upms.request.UserQueryRequest;
import com.scs.application.modules.upms.vo.UserVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description: 用户Mapper
 **/
@Mapper
public interface UserMapper extends BaseMapper<User> {


    List<UserVO> list(@Param("request") UserQueryRequest request);


    IPage<UserVO> page(IPage page, @Param("request") UserQueryRequest request);


    List<User> selectByLoginKey(@Param("request") UserQueryRequest request);
    /**
     * 通用分页查询
     * @param page
     * @param wrapper
     * @return
     */
    Page<User> pageCommon(IPage page, @Param(Constants.WRAPPER) QueryWrapper<User> wrapper);

}
